package com.myhouse.biz.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.myhouse.biz.DistrictBiz;
import com.myhouse.dao.DistrictDao;
import com.myhouse.entity.District;


@Service("districtBiz")
public class DistrictBizImpl implements DistrictBiz{

	@Autowired
	private DistrictDao districtDao;
	
	public boolean insertDistrict(String name) {
		return districtDao.insertDistrict(name);
	}

	public boolean updateDistrict(District district) {
		return districtDao.updateDistrict(district);
	}

	public boolean deleteDistrict(int id) {
		return districtDao.deleteDistrict(id);
	}

	public List<District> getAll() {
		return districtDao.getAll();
	}

}
